package com.zlzxm.sorting.ui.activity

import androidx.viewbinding.ViewBinding
import com.zlzxm.sorting.databinding.AcCaoZuoBinding
import com.zlzxm.sorting.databinding.AcSortingByProductBinding
import com.zlzxm.sorting.ui.fragment.FmCaoZuo
import com.zlzxm.sorting.ui.fragment.FmSortViewProduct
import com.zlzxm.sorting.ui.view.sortview2.EntityIndex
import com.zlzxm.sorting.util.ui.manager.AbsAcBase

/**
 *
 *CREATE BY zlzxm ON 2022/8/22
 *
 */
class AcCaozuo : AbsAcBase(){

    val binding by lazy {

        AcCaoZuoBinding.inflate(layoutInflater)
    }

    override fun initBinding(): ViewBinding {

        return  binding
    }

    override fun initViewModel() {

    }

    override fun initView() {


//        fullScreenMode()

    }

    override fun initData() {

        val list = mutableListOf<EntityIndex>()

        var title = ""

        for (item in 0..8){

            when (item) {

                0 -> {

                    title = "宁海县技工学 校餐厅"

                }
                1 -> {
                    title = "宁海县技工学 校餐厅"

                }
                2 -> {
                    title = "宁海县技工学 校餐厅"

                }

                3 -> {
                    title = "宁海县技工学 校餐厅"

                }
                4 -> {
                    title = "宁海县技工学 校餐厅"

                }
                5 -> {
                    title = "宁海县技工学 校餐厅"

                }
                6 -> {
                    title = "宁海县技工学 校餐厅"

                }

                7 -> {
                    title = "宁海县技工学 校餐厅"

                }

                8 -> {
                    title = "宁海县技工学 校餐厅"

                }


            }

            list.add(EntityIndex(false,"$item","$title",
                FmCaoZuo.create("$item")))

        }

        binding.sortView2.setNewIndex(list,supportFragmentManager,lifecycle)
    }
}